package com.czxy.demo01;

/**
 * Created by hp on 2020/2/26.
 */
public class Coures {
    private String cid;
    private String cname;
    private int chour;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Coures coures = (Coures) o;

        if (chour != coures.chour) return false;
        if (!cid.equals(coures.cid)) return false;
        return cname.equals(coures.cname);
    }

    @Override
    public int hashCode() {
        int result = cid.hashCode();
        result = 31 * result + cname.hashCode();
        result = 31 * result + chour;
        return result;
    }

    @Override
    public String toString() {
        return "Coures{" +
                "cid='" + cid + '\'' +
                ", cname='" + cname + '\'' +
                ", chour=" + chour +
                '}';
    }

    public String getCid() {
        return cid;
    }

    public void setCid(String cid) {
        this.cid = cid;
    }

    public String getCname() {
        return cname;
    }

    public void setCname(String cname) {
        this.cname = cname;
    }

    public int getChour() {
        return chour;
    }

    public void setChour(int chour) {
        this.chour = chour;
    }

    public Coures() {
    }

    public Coures(String cid, String cname, int chour) {
        this.cid = cid;
        this.cname = cname;
        this.chour = chour;
    }
}
